package model

type Admin struct {
	Id             int             `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
	AdminName      string          `json:"admin_name" form:"admin_name" gorm:"column:admin_name;comment:管理员用户名"`
	Sex            string          `json:"sex" form:"sex" gorm:"column:sex;comment:性别"`
	Account        string          `json:"account" form:"account" gorm:"column:account;comment:账户" `
	Password       string          `json:"password" form:"password" gorm:"column:password;comment:密码"`
	BasicData      string          `json:"basic_data" form:"basic_data" gorm:"column:basic_data;comment:基础信息"`
	Authorizations []Authorization `json:"authorizations" gorm:"foreignKey:admin_id;references:id;column:authorizations"`
}

func (Admin) TableName() string {
	return "admin"
}
